body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

* {
  box-sizing: border-box;
}

.ant-layout {
  min-height: 100vh;
}

.ant-layout-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ant-layout-content {
  padding: 0;
  background: #f5f5f5;
}

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  margin: 0 0 24px 0;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
  color: white;
  width: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-left {
  flex: 1;
}

.page-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-description {
  margin: 8px 0 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 页面内容区域 */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 项目列表布局 */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0 0 48px 0; /* 底部留白，避免最后一张卡片贴底 */
}

/* 参数分类页面布局 - 单列布局 */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0;
}

.project-card-wrapper {
  width: 100%;
  display: flex;
}

/* 原始项目卡片样式 - 用于参数分类页面 */
.project-card {
  width: 100%;
  height: auto;
  min-height: 80px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: white;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.project-card:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  border-color: rgba(102, 126, 234, 0.2);
}

.project-card .ant-card-head {
  border-bottom: none;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.project-card .ant-card-extra {
  margin-left: 16px;
  flex-shrink: 0;
}

.project-card .ant-card-head-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  text-align: center;
  width: 100%;
}

.project-card .ant-card-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  border-left: 1px solid #f0f0f0;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #666;
  font-size: 14px;
  flex: 1;
  align-items: flex-start;
}

.project-meta span {
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-weight: 400;
  color: #666;
}

.project-meta .anticon {
  margin-right: 6px;
  color: #667eea;
}

/* 增强版项目卡片样式 */
.project-card-enhanced {
  width: 100%;
  height: auto;
  min-height: 280px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card-enhanced:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-color: #d9d9d9;
}


/* 卡片头部 */
.project-card-header {
  padding: 24px 24px 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.project-title-section {
  flex: 1;
}

.project-title {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.project-name {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}

.project-name-en {
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  padding: 2px 8px;
  margin-left: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.project-description {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* 卡片内容 */
.project-card-content {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 统计信息 */
.project-stats {
  margin: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* 时间信息 */
.project-time-info {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.time-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}

.time-icon {
  color: #667eea;
  font-size: 16px;
}

.time-step {
  margin-left: auto;
  font-size: 12px;
  color: #64748b;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

/* 卡片底部 */
.project-card-footer {
  padding: 16px 24px 24px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.created-date {
  color: #64748b;
}

.updated-date {
  color: #94a3b8;
}

/* 操作按钮 */
.project-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.action-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  transform: translateY(-1px);
}

.edit-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.category-card {
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card .ant-card-head {
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 8px 8px 0 0;
}

.category-card .ant-card-head-title {
  font-size: 16px;
  font-weight: 600;
}

.parameter-list {
  margin-top: 16px;
}

.parameter-item {
  transition: all 0.3s ease;
  position: relative;
}

.parameter-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #40a9ff;
}

.parameter-item:hover .parameter-actions .ant-btn {
  opacity: 1;
  transform: scale(1.05);
}

.parameter-actions .ant-btn {
  opacity: 0.7;
  transition: all 0.2s ease;
}

.parameter-item:hover .parameter-actions .ant-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* 响应式设计 - 参数卡片 */
@media (max-width: 768px) {
  .parameter-item {
    padding: 16px;
  }
  
  .parameter-item .parameter-actions {
    margin-left: 12px;
  }
  
  .parameter-item .parameter-actions .ant-btn {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .parameter-item .parameter-name {
    font-size: 16px !important;
  }
  
  .parameter-item .parameter-name-en {
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  .parameter-item {
    padding: 12px;
  }
  
  .parameter-item .parameter-actions {
    flex-direction: column;
    gap: 4px;
    margin-left: 8px;
  }
  
  .parameter-item .parameter-actions .ant-btn {
    width: 32px;
    height: 32px;
    padding: 0;
  }
}

.parameter-info {
  flex: 1;
}

.parameter-name {
  font-weight: 500;
  color: #262626;
  margin-bottom: 4px;
}

.parameter-name-en {
  font-size: 12px;
  color: #8c8c8c;
  font-family: 'Courier New', monospace;
}

.parameter-type {
  display: inline-block;
  padding: 2px 8px;
  background: #e6f7ff;
  color: #1890ff;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 8px;
}

.parameter-unit {
  color: #8c8c8c;
  font-size: 12px;
}

.parameter-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #8c8c8c;
}

.empty-state .ant-empty-description {
  color: #8c8c8c;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .ant-layout-content {
    padding: 16px;
  }
  
  .page-header {
    padding: 12px 16px;
    margin-bottom: 16px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .project-card-enhanced {
    min-height: 260px;
  }
  
  .project-card-header {
    padding: 20px 20px 12px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .project-card-content {
    padding: 16px 20px;
    gap: 16px;
  }
  
  .project-stats .ant-col {
    margin-bottom: 8px;
  }
  
  .stat-item {
    padding: 12px;
  }
  
  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .project-card-footer {
    padding: 12px 20px 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .project-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .action-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .project-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .parameter-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .parameter-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .page-content {
    padding: 0 16px;
  }
  
  .project-card-enhanced {
    min-height: 240px;
    border-radius: 12px;
  }
  
  .project-card-header {
    padding: 16px 16px 12px 16px;
  }
  
  .project-card-content {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .project-name {
    font-size: 18px;
  }
  
  .project-description {
    font-size: 13px;
  }
  
  .stat-item {
    padding: 10px;
  }
  
  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .project-card-footer {
    padding: 10px 16px 16px 16px;
  }
  
  .action-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .project-meta-info {
    font-size: 11px;
  }
}

/* 项目卡片操作按钮 */
.project-card .ant-card-actions {
  background: transparent;
  border-top: none;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 导入导出按钮美化 */
.header-actions .ant-btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-actions .ant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-actions .ant-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.header-actions .ant-btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 项目卡片导出按钮美化 */
.project-actions .ant-btn-primary {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%) !important;
  border: none !important;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(82, 196, 26, 0.3);
}

.project-actions .ant-btn-primary:hover {
  background: linear-gradient(135deg, #45a018 0%, #66c02a 100%) !important;
  border-color: #45a018 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(82, 196, 26, 0.4);
}

.project-actions .ant-btn-primary:focus {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%) !important;
  border-color: #52c41a !important;
}

.project-actions .ant-btn-primary:active {
  background: linear-gradient(135deg, #45a018 0%, #66c02a 100%) !important;
  border-color: #45a018 !important;
}

/* 模态框美化 */
.ant-modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e8e8e8;
  border-radius: 8px 8px 0 0;
}

.ant-modal-title {
  font-weight: 600;
  color: #262626;
}

.ant-modal-body {
  padding: 24px;
  background: #fafafa;
}

/* 删除确认模态框特殊样式 */
.ant-modal.ant-modal-centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ant-modal.ant-modal-centered .ant-modal-content {
  margin: 0;
  max-height: 90vh;
  overflow: auto;
}

/* 删除确认模态框内容样式 */
.delete-confirm-modal .ant-modal-header {
  background: linear-gradient(135deg, #fff2f0 0%, #ffffff 100%);
  border-bottom: 1px solid #ffccc7;
}

.delete-confirm-modal .ant-modal-title {
  color: #ff4d4f;
  font-weight: 700;
}

.delete-confirm-modal .ant-modal-body {
  background: #fff;
  padding: 0;
}

/* 拖拽上传区域美化 */
.ant-upload-dragger {
  border-radius: 12px;
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ant-upload-dragger:hover {
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
  border-color: #1890ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
}

/* 卡片悬停效果增强 */
.project-card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* 统计卡片悬停效果 */
.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

/* 按钮组动画 */
.project-actions .ant-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  font-weight: 500;
}

.project-actions .ant-btn:hover {
  transform: translateY(-1px) scale(1.05);
}

/* 查看按钮悬停效果 */
.project-actions .view-btn:hover {
  color: #ffffff !important;
  background: #1890ff !important;
  border-color: #1890ff !important;
  box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
}

/* 编辑按钮悬停效果 */
.project-actions .edit-btn:hover {
  color: #ffffff !important;
  background: #52c41a !important;
  border-color: #52c41a !important;
  box-shadow: 0 4px 8px rgba(82, 196, 26, 0.3);
}

/* 删除按钮悬停效果 */
.project-actions .delete-btn:hover {
  color: #ffffff !important;
  background: #ff4d4f !important;
  border-color: #ff4d4f !important;
  box-shadow: 0 4px 8px rgba(255, 77, 79, 0.3);
}

/* 进度条美化 */
.ant-progress-bg {
  background: linear-gradient(90deg, #1890ff 0%, #52c41a 100%);
}

/* 标签美化 */
.ant-tag {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.ant-tag:hover {
  transform: scale(1.05);
}

/* 警告框美化 */
.ant-alert {
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 卡片选择效果 */
.ant-card[style*="border: 2px solid #1890ff"] {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(24, 144, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(24, 144, 255, 0);
  }
}

/* 成功状态动画 */
.ant-alert-success {
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 导入进度区域动画 */
.import-progress-container {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 加载状态美化 */
.ant-spin-dot {
  font-size: 24px;
}

.ant-spin-dot i {
  background-color: #667eea;
}

/* 空状态美化 */
.ant-empty {
  padding: 48px 24px;
}

.ant-empty-description {
  color: #8c8c8c;
  font-size: 16px;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .header-actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .header-actions .ant-btn {
    width: 100%;
    margin: 0;
  }
  
  .project-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .project-actions .ant-btn {
    flex: 1;
    min-width: 60px;
  }
}

/* 分类容器样式 */
.category-container {
  margin-bottom: 16px;
  width: 100%;
}

.category-container .project-card {
  width: 100%;
}

/* 参数列表下滑动画 */
.parameter-list-slide-down {
  background: #fafafa;
  border-radius: 0 0 8px 8px;
  border: 1px solid #e8e8e8;
  border-top: none;
  margin-top: -1px;
  width: 100%;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
}

.parameter-list-slide-down.expanded {
  max-height: 5000px;
  opacity: 1;
  padding: 16px;
}

.parameter-list-slide-down.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    padding-top: 16px;
    padding-bottom: 16px;
    transform: translateY(0);
  }
}

.parameter-list-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.parameter-list-item {
  background: white;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.parameter-list-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.parameter-list-item:last-child {
  margin-bottom: 0;
}

.project-card .ant-card-actions .ant-btn {
  border: none;
  background: transparent;
  color: #666;
  font-weight: 500;
  transition: all 0.2s ease;
}

.project-card .ant-card-actions .ant-btn:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.project-card .ant-card-actions .ant-btn-danger:hover {
  color: #ff4d4f;
  background: rgba(255, 77, 79, 0.1);
}
